10 ON ERROR GOTO 40
20 OPEN "I",#1,"BOOT.DFT":INPUT #1,P1,P2,P3,BACK:CLOSE
30 GOTO 50
40 P1=3:P2=5:P3=15:BACK=0:RESET:RESUME 50
50 KEY OFF:SCREEN 2:SCREEN 0:COLOR 15,0,0:CLS:SCREEN 0,1,1,1,1:CLS:SCREEN 0,0,0,0,0:DIM A$(15):FOR A=0 TO 15:A$(A)="0":NEXT
60 VIEW PRINT 1 TO 25:COLOR 15,0,0:CLS
70 MODE=4:ZX=0:DIM A(4000):DIM TOP(500):BAR=1:DIM B(2000):DIM C(2000)
80 SCREEN 4:GET(1,1)-(1,1),C:SCREEN 2:SCREEN 0,0,1
90 CLS:C=0:LOCATE 1,34:PRINT "SUPER ART II"
100 LOCATE 2,34:PRINT "------------"
110 RESTORE 150:FOR X=3 TO 74 STEP 5
120 C=C+1:COLOR C
130 FOR Y=4 TO 6:LOCATE Y,X:PRINT STRING$(4,219)
140 NEXT:COLOR 7:LOCATE 7,X+1:READ A$:PRINT A$:NEXT
150 DATA 00,01,02,03,04,05,06,07,08,09,A0,A1,A2,A3,A4
160 DATA B0,B1,B2,B3,B4,B5,B6,B7,B8,B9,C0,C1,C2,C3,C4
170 C=0:RESTORE 160:FOR X=3 TO 74 STEP 5
180 C=C+1:COLOR C
190 FOR Y=9 TO 11:LOCATE Y,X:PRINT STRING$(4,177)
200 NEXT:COLOR 7:LOCATE 13,X+1:READ A$:PRINT A$:NEXT
210 COLOR 14:LOCATE 15,1:PRINT STRING$(80,205)
220 COLOR 15:LOCATE 16,3:PRINT "(1) One (2) Two (3) Three (4) Background (5) Reset (6) Use (7) Defalt save"
230 COLOR 14:LOCATE 17,1:PRINT STRING$(80,205)
240 COLOR P1:FOR Y=19 TO 22:LOCATE Y,1:PRINT STRING$(10,219):NEXT
250 COLOR P2:FOR Y=19 TO 22:LOCATE Y,15:PRINT STRING$(10,219):NEXT
260 COLOR P3:FOR Y=19 TO 22:LOCATE Y,30:PRINT STRING$(10,219):NEXT
270 IF BACK=0 THEN 280 ELSE COLOR BACK:FOR Y=19 TO 22:LOCATE Y,45:PRINT STRING$(10,219):NEXT:GOTO 290
280 COLOR 7:FOR Y=19 TO 22:LOCATE Y,45:PRINT STRING$(10,176):NEXT
290 IF FLAG=1 THEN FLAG=0:GOTO 350
300 COLOR 15:LOCATE 20,62:PRINT "(C)1989 RufusPro"
310 LOCATE 21,60:PRINT "Program by B.Deforest"
320 COLOR 7:LOCATE 24,4:PRINT "CAN 1":LOCATE 24,18:PRINT "CAN 2":LOCATE 24,33:PRINT "CAN 3":LOCATE 24,45:PRINT "BACKGROUND"
330 REM END OF SCREEN SETUP
340 SCREEN 0,0,0,0,0:CLS:PCOPY 1,0:R1=P1:R2=P2:R3=P3:R4=BACK
350 A1=P1*5:A2=P2*5:A3=P3*5:A4=BACK*5:A1=A1-2:A2=A2-1:A4=A4+1
360 COLOR P1:LOCATE 3,A1:PRINT "1"
370 COLOR P2:LOCATE 3,A2:PRINT "2"
380 COLOR P3:LOCATE 3,A3:PRINT "3"
390 IF BACK<>0 THEN COLOR BACK:LOCATE 3,A4:PRINT "B"
400 COLOR 7:PP1=P1:PP2=P2:PP3=P3:BACK2=BACK
410 A$=INKEY$:IF A$="" THEN 410
415 IF A$=CHR$(27) THEN CHDIR "..":RUN "menu"
420 IF A$="1" THEN P1=P1+1:GOTO 500
430 IF A$="2" THEN P2=P2+1:GOTO 500
440 IF A$="3" THEN P3=P3+1:GOTO 500
450 IF A$="4" THEN BACK=BACK+1:GOTO 500
460 IF A$="5" THEN P1=R1:P2=R2:P3=R3:PP1=P1:PP2=P2:PP3=P3:LOCATE 3,1:PRINT STRING$(80,32):BACK=R4:BACK2=R4:FLAG=1:GOTO 240
470 IF A$="6" THEN GOTO 580
480 IF A$="7" THEN CLOSE:FOR P=2 TO 15 STEP 2:PALETTE P-1,7:PALETTE P,8:NEXT:OPEN "O",#1,"BOOT.DFT":WRITE #1,P1,P2,P3,BACK:CLOSE:FOR P=1 TO 15:PALETTE P,P:NEXT
490 GOTO 410
500 IF P1=16 THEN P1=1
510 IF P2=16 THEN P2=1
520 IF P3=16 THEN P3=1
530 IF BACK=16 THEN BACK=0
540 IF P1<>PP1 THEN COLOR P1:FOR Y=19 TO 22:LOCATE Y,1:PRINT STRING$(10,219):NEXT:LOCATE 3,A1:PRINT " ":A1=P1*5:A1=A1-2:COLOR P1:LOCATE 3,A1:PRINT "1":PP1=P1:GOTO 410
550 IF P2<>PP2 THEN COLOR P2:FOR Y=19 TO 22:LOCATE Y,15:PRINT STRING$(10,219):NEXT:LOCATE 3,A2:PRINT " ":A2=P2*5:A2=A2-1:COLOR P2:LOCATE 3,A2:PRINT "2":PP2=P2:GOTO 410
560 IF P3<>PP3 THEN COLOR P3:FOR Y=19 TO 22:LOCATE Y,30:PRINT STRING$(10,219):NEXT:LOCATE 3,A3:PRINT " ":A3=P3*5:COLOR P3:LOCATE 3,A3:PRINT "3":PP3=P3:GOTO 410
570 FLAG=1:LOCATE 3,1:PRINT STRING$(80,32):GOTO 270
580 IF MODE=3 THEN 2820 ELSE IF MODE=2 THEN 4000
590 P2=PP2:P1=PP1:P3=PP3:BACK=BACK2
600 CLS:SCREEN 4:PALETTE 0,BACK:PALETTE 1,P1:PALETTE 2,P2:PALETTE 3,P3:P=1
610 IF ZX=1 THEN PUT(0,0),A,PSET:ZX=0
620 X=10:Y=10:Y2=Y:X2=X:P2=POINT(X,Y)
625 GET(0,0)-(319,8),TOP
630 IF BAR=1 THEN GET(0,0)-(319,8),TOP:LOCATE 1,1:PRINT STRING$(40,32):COLOR 1:LOCATE 1,1:PRINT CHR$(176)CHR$(219);:COLOR 2:PRINT CHR$(219);:COLOR 3:PRINT CHR$(219):COLOR 2:LOCATE 1,8:PRINT "FILE = ";:COLOR 3:PRINT F$:COLOR 1:LOCATE 1,30:PRINT "PEN"
640 IF BAR=1 AND P<>0 THEN COLOR P:LOCATE 1,35:PRINT CHR$(219)CHR$(219):LINE(0,8)-(319,8),1
650 IF BAR=1 AND P=0 THEN COLOR 1:LOCATE 1,35:PRINT CHR$(176)CHR$(176):LINE(0,8)-(319,8),1
660 A$=INKEY$:IF A$="" THEN 660
670 IF A$="S" AND BAR=1 AND A$(P2)="0" THEN RN1=FIX(RND*10):RN2=FIX(RND*8):PUT(0,0),TOP,PSET:PSET(X-5+RN1,Y-5+RN2),P:GOTO 630
680 IF A$="S" AND BAR=0 AND A$(P2)="0" THEN RN1=FIX(RND*10):RN2=FIX(RND*8):PSET(X-5+RN1,Y-5+RN2),P:GOTO 660
690 IF A$="B" AND BAR=1 THEN PUT(0,0),TOP,PSET:BAR=0:GOTO 660
700 IF A$="B" AND BAR=0 THEN BAR=1:GOTO 930
710 IF A$="8" AND BAR=0 AND Y<>0 THEN Y=Y-1 ELSE IF A$="8" AND BAR=1 AND Y<>9 THEN Y=Y-1
720 IF A$="2" AND Y<>199 THEN Y=Y+1
730 IF A$="4" AND X<>0 THEN X=X-1 ELSE IF A$="6" AND X<>319 THEN X=X+1
740 IF A$=" " THEN A=P2:IF A$(A)="0" THEN P2=P
750 PSET(X2,Y2),P2:X2=X:Y2=Y:P2=POINT(X,Y):PSET(X,Y),P2+1:IF A$="8" OR A$="2" OR A$="6" OR A$="4" THEN 660
760 IF A$=CHR$(13) AND P=3 THEN P=0:GOTO 950 ELSE IF A$=CHR$(13) AND P<>3 THEN P=P+1:GOTO 950
770 IF A$="P" THEN ZX=1:PUT(0,0),TOP,PSET:PSET(X2,Y2),P2:GET(0,0)-(319,199),A:SCREEN 2:SCREEN 0,0,1:P1=PP1:P2=PP2:P3=PP3:GOTO 90
780 IF A$="F" AND BAR=0 THEN PSET(X2,Y2),P2:PAINT(X,Y),P:PSET(X2,Y2),P:P2=P
790 IF A$="L" THEN 980
800 IF A$="C" THEN 1130
810 IF A$="R" THEN 1270
820 IF A$="F" AND BAR=1 THEN PUT(0,0),TOP,PSET:PSET(X2,Y2),P2:PAINT(X,Y),P:PSET(X2,Y2),P:P2=P:GOTO 630
830 IF A$=CHR$(17) THEN CLS:GET(0,0)-(319,199),A:GET(0,0)-(319,8),TOP:GOTO 630
840 IF A$="D" AND BAR=1 THEN PUT(0,0),TOP,PSET:ZX=1:PSET(X,Y),P2:GET(0,0)-(319,199),A:GOTO 2180
850 IF A$="D" AND BAR=0 THEN ZX=1:PSET(X,Y),P2:GET(0,0)-(319,199),A:GOTO 2180
860 IF A$="I" THEN 1440
870 IF A$="O" THEN 1570
880 IF A$="E" AND BAR=1 THEN PSET(X,Y),P2:PUT(0,0),TOP,PSET:GET(0,0)-(319,199),A:ZX=1:GOTO 1750
890 IF A$="E" AND BAR=0 THEN PSET(X,Y),P2:GET(0,0)-(319,199),A:ZX=1:GOTO 1750
900 IF A$="M" AND BAR=1 THEN PSET(X,Y),P2:PUT(0,0),TOP,PSET:GET(0,0)-(319,199),A:ZX=1:GOTO 2660
910 IF A$="M" AND BAR=0 THEN PSET(X,Y),P2:GET(0,0)-(319,199),A:ZX=1:GOTO 2660
920 GOTO 660
930 IF Y2<9 THEN PSET(X2,Y2),P2:X=X2:Y=9:X2=X:Y2=Y:P2=POINT(X,Y):GOTO 630
940 GOTO 630
950 IF BAR=1 AND P<>0 THEN COLOR P:LOCATE 1,35:PRINT CHR$(219)CHR$(219):GOTO 660
960 IF BAR=1 AND P=0 THEN COLOR 1:LOCATE 1,35:PRINT CHR$(176)CHR$(176):GOTO 660
970 GOTO 660
980 X1=X:Y1=Y
990 IF BAR=1 THEN PUT(0,0),TOP,PSET
1000 XX=X:YY=Y:GET(X,Y)-(X,Y),B
1010 A$=INKEY$:IF A$="" THEN 1010
1020 IF X1<XX THEN X3=X1 ELSE X3=XX
1030 IF Y1<YY THEN Y3=Y1 ELSE Y3=YY
1040 PUT(X3,Y3),B,PSET
1050 IF A$="4" AND XX<>0 THEN XX=XX-1 ELSE IF A$="6" AND XX<>319 THEN XX=XX+1
1060 IF A$="8" AND YY<>0 THEN YY=YY-1 ELSE IF A$="2" AND YY<>199 THEN YY=YY+1
1070 IF X1<XX THEN X3=X1:X4=XX ELSE X3=XX:X4=X1
1080 IF Y1<YY THEN Y3=Y1:Y4=YY ELSE Y3=YY:Y4=Y1
1090 GET(X3,Y3)-(X4,Y4),B:LINE(X1,Y1)-(XX,YY),P
1100 IF A$=CHR$(13) THEN P2=P:X=XX:Y=YY:X2=XX:Y2=YY:GOTO 630
1110 IF A$=CHR$(27) THEN PUT(X3,Y3),B,PSET:X=X1:Y=Y1:X=XX:Y=YY:GOTO 630
1120 GOTO 1010
1130 YY2=Y2:XX2=X2:X1=X-S:X2=X+S:Y1=Y-S:Y2=Y+S:GET(X1,Y1)-(X2,Y2),B
1140 IF BAR=1 THEN PUT(0,0),TOP,PSET
1150 CIRCLE(X,Y),S,P:S2=S
1160 A$=INKEY$:IF A$="" THEN 1160
1170 IF A$="4" AND S<>0 THEN S=S-1 ELSE IF A$="6" THEN S=S+1
1180 IF A$=CHR$(27) THEN PUT(X1,Y1),B,PSET:S=S2:PSET(X,Y),P2:Y2=YY2:X2=XX2:GOTO 630
1190 IF A$=CHR$(13) THEN PSET(X,Y),P2:Y2=YY2:X2=XX2:GOTO 630
1200 PUT(X1,Y1),B,PSET
1210 X1=X-S:X2=X+S:Y1=Y-S:Y2=Y+S
1220 IF X1<0 THEN X1=0 ELSE IF X1>319 THEN X1=319
1230 IF Y1<0 THEN Y1=0 ELSE IF Y1>199 THEN Y1=199
1240 GET(X1,Y1)-(X2,Y2),B:CIRCLE(X,Y),S,P
1250 GOTO 1160
1260 IF A$="R" THEN 1270
1270 X1=X:Y1=Y:X3=X:Y3=Y:Y4=Y:X4=X
1280 IF BAR=1 THEN PUT(0,0),TOP,PSET
1290 GET(X,Y)-(X,Y),B:LINE(X,Y)-(X,Y),P,B
1300 A$=INKEY$:IF A$="" THEN 1300
1310 IF A$="4" AND X1<>0 THEN X1=X1-1 ELSE IF A$="6" THEN X1=X1+1
1320 IF A$="8" AND Y1<>0 THEN Y1=Y1-1 ELSE IF A$="2" THEN Y1=Y1+1
1330 PUT(X3,Y3),B,PSET
1340 IF X1<X THEN X3=X1:X4=X ELSE X3=X:X4=X1
1350 IF Y1<Y THEN Y3=Y1:Y4=Y ELSE Y3=Y:Y4=Y1
1360 IF X1<0 THEN X1=0 ELSE IF X1>319 THEN X1=319
1370 IF X2<0 THEN X2=0 ELSE IF X2>319 THEN X2=319
1380 IF Y1<0 THEN Y1=0 ELSE IF Y1>199 THEN Y1=199
1390 IF Y2<0 THEN Y2=0 ELSE IF Y2>199 THEN Y2=199
1400 GET(X3,Y3)-(X4,Y4),B:LINE(X,Y)-(X1,Y1),P,B
1410 IF A$=CHR$(13) THEN P2=P:GOTO 630
1420 IF A$=CHR$(27) THEN PUT(X3,Y3),B,PSET:GOTO 630
1430 GOTO 1300
1440 X1=X:Y1=Y:IF BAR=1 THEN PUT(0,0),TOP,PSET
1450 PSET(X,Y),P2
1460 GET(X,Y)-(X,Y),C:X8=X:X9=X:Y8=Y:Y9=Y
1470 A$=INKEY$:IF A$="" THEN 1470
1480 IF A$="4" AND X1<>0 THEN X1=X1-1 ELSE IF A$="6" AND X1<>319 THEN X1=X1+1
1490 IF A$="8" AND Y1<>0 THEN Y1=Y1-1 ELSE IF A$="2" AND Y1<>199 THEN Y1=Y1+1
1500 PUT(X8,Y8),C,PSET
1510 IF X1<X THEN X8=X1:X9=X ELSE X8=X:X9=X1
1520 IF Y1<Y THEN Y8=Y1:Y9=Y ELSE Y8=Y:Y9=Y1
1530 GET(X8,Y8)-(X9,Y9),C:LINE(X8,Y8)-(X9,Y9),P,B
1540 IF A$=CHR$(27) THEN PUT(X8,Y8),C,PSET:GET(X,Y)-(X,Y),C:X8=X:X9=X:Y8=Y:Y9=Y:GOTO 630
1550 IF A$=CHR$(13) THEN PUT(X8,Y8),C,PSET:P2=POINT(X,Y):GOTO 630
1560 GOTO 1470
1570 D=X9-X8:D2=Y9-Y8:X8=X:Y8=Y:X9=X8+D:Y9=Y8+D2:IF X8>319 OR X9>319 THEN 660
1580 IF X8<0 OR X9<0 THEN 660
1590 IF Y8<0 OR Y9<0 THEN 660
1600 IF Y8>199 OR Y9>199 THEN 660
1610 IF BAR=1 THEN PUT(0,0),TOP,PSET
1620 PSET(X,Y),P2
1630 XX1=X8:YY1=Y8
1640 TX1=319-(X9-X8):TY1=199-(Y9-Y8)
1650 PUT(XX1,YY1),C
1660 A$=INKEY$:IF A$="" THEN 1660
1670 PUT(XX1,YY1),C
1680 IF A$="4" AND XX1<>0 THEN XX1=XX1-1 ELSE IF A$="6" AND XX1<>TX1 THEN XX1=XX1+1
1690 IF A$="8" AND YY1<>0 THEN YY1=YY1-1 ELSE IF A$="2" AND YY1<>TY1 THEN YY1=YY1+1
1700 PUT(XX1,YY1),C
1710 IF A$=CHR$(27) THEN PUT(XX1,YY1),C:GOTO 630
1720 IF A$=CHR$(13) THEN PUT(XX1,YY1),C,PSET:X=X8:Y=Y8:GOTO 630
1730 IF A$="T" THEN X=X8:Y=Y8:GOTO 630
1740 GOTO 1660
1750 SCREEN 2:SCREEN 0:COLOR 15:CLS
1760 LOCATE 1,25:PRINT "Super Art II (Protected Inks)"
1770 LOCATE 2,25:PRINT "-----------------------------"
1780 COLOR 7:LOCATE 4,10:PRINT STRING$(4,176)" A0"
1790 RESTORE 1810
1800 Y=5:FOR C=1 TO 15:COLOR C:LOCATE Y,10:PRINT STRING$(4,219):Y=Y+1:COLOR 7:READ A$:LOCATE Y-1,15:PRINT A$:NEXT
1810 DATA A1,A2,A3,A4,A5,A6,A7,A8,A9,B0,B1,B2,B3,B4,B5
1820 FOR A=0 TO 15:A$=A$(A)
1830 IF A$="0" THEN COLOR 10:LOCATE 4+A,18:PRINT "(OK)       " ELSE COLOR 4:LOCATE 4+A,18:PRINT "(PROTECTED)"
1840 NEXT
1850 IF FGL=1 THEN FGL=0:GOTO 1970
1860 COLOR 14:LOCATE 5,30:PRINT STRING$(50,205)
1870 COLOR 11:LOCATE 7,40:PRINT "(1) - TOGGLE INK"
1880 LOCATE 8,40:PRINT "(2) - PROTECT ALL INKS"
1890 LOCATE 9,40:PRINT "(3) - CLEAR ALL INKS"
1900 LOCATE 10,40:PRINT "(4) - PROTECT REDS"
1910 LOCATE 11,40:PRINT "(5) - PROTECT BLUES"
1920 LOCATE 12,40:PRINT "(6) - PROTECT GREENS"
1930 LOCATE 13,40:PRINT "(7) - PROTECT GREYS"
1940 LOCATE 14,40:PRINT "(8) - RETURN"
1950 COLOR 14:LOCATE 16,30:PRINT STRING$(50,205)
1960 COLOR 7
1970 LOCATE 24,1:PRINT "SELECT OPTION"
1980 A$=INKEY$:IF A$="" THEN 1980
1990 IF VAL(A$)>0 AND VAL(A$)<9 THEN LOCATE 24,1:PRINT STRING$(30,32)
2000 IF A$="2" THEN FOR A=1 TO 15:A$(A)="1":NEXT:FGL=1:GOTO 1820
2010 IF A$="3" THEN FOR A=0 TO 15:A$(A)="0":NEXT:FGL=1:GOTO 1820
2020 IF A$="4" THEN A$(4)="1":A$(5)="1":A$(12)="1":A$(13)="1":A$(14)="1":FGL=1:GOTO 1820
2030 IF A$="5" THEN A$(1)="1":A$(3)="1":A$(9)="1":A$(11)="1":FGL=1:GOTO 1820
2040 IF A$="6" THEN A$(2)="1":A$(10)="1":FGL=1:GOTO 1820
2050 IF A$="7" THEN A$(7)="1":A$(8)="1":A$(15)="1":FGL=1:GOTO 1820
2060 IF A$="8" THEN 580
2070 IF A$="1" THEN FGL=1:GOTO 2090
2080 GOTO 1980
2090 COLOR 15:A=0
2100 A$=INKEY$:IF A$="" THEN 2100
2110 IF A$="8" AND A<>0 THEN A=A-1 ELSE IF A$="2" AND A<>15 THEN A=A+1
2120 LOCATE 4+A-1,8:PRINT " ":LOCATE 4+A+1,8:PRINT " ":LOCATE 4+A,8:PRINT ">"
2130 IF A$=CHR$(13) AND A$(A)="1" THEN A$(A)="0":LOCATE 4+A,8:PRINT " ":GOTO 1820
2140 IF A$=CHR$(13) AND A$(A)="0" THEN A$(A)="1":LOCATE 4+A,8:PRINT " ":GOTO 1820
2150 IF A$=CHR$(27) THEN LOCATE 4+A,8:PRINT " ":GOTO 1970
2160 GOTO 2100
2170 END
2180 SCREEN 2:SCREEN 0:CLS
2190 COLOR 15:LOCATE 1,30:PRINT "SUPER ART II (FILES)"
2200 LOCATE 2,30:PRINT "--------------------"
2210 COLOR 10
2220 LOCATE 5,10:PRINT "(1) - CATERLOG OF FILES"
2230 LOCATE 6,10:PRINT "(2) - SAVE AS"
2240 LOCATE 7,10:PRINT "(3) - MEMORY SAVE"
2250 LOCATE 8,10:PRINT "(4) - LOAD FILE"
2260 LOCATE 9,10:PRINT "(5) - RETURN"
2270 COLOR 14:LOCATE 11,1:PRINT STRING$(80,205)
2280 COLOR 12:LOCATE 13,10:PRINT "FILE IN MEMORY : "F$
2290 COLOR 13:IF ZX=0 THEN LOCATE 13,60:PRINT "TALLY : NO" ELSE LOCATE 13,60:PRINT "TALLY : YES"
2300 COLOR 12:LOCATE 15,10:PRINT "SCREEN MODE :"MODE
2310 COLOR 11:LOCATE 24,1:PRINT "PLEASE SELECT"
2320 A$=INKEY$:IF A$="" THEN 2320
2321 IF A$=CHR$(27) THEN CHDIR "..":RUN "menu"
2330 IF A$="1" THEN CLS:COLOR 15:PRINT "FILES ON DISC:":COLOR 10:PRINT:FILES:COLOR 15:PRINT:PRINT ">>> PRESS SPACE <<<":WHILE INKEY$<>" ":WEND:GOTO 2180
2340 IF A$="2" OR A$="3" OR A$="4" OR A$="5" THEN LOCATE 24,1:PRINT STRING$(40,32)
2350 IF A$="2" THEN COLOR 15:LOCATE 20,5:PRINT "ENTER FILE TO SAVE:";:COLOR 9:INPUT "",F$:IF F$="" THEN 2180 ELSE 2410
2360 IF A$="3" AND F$="" THEN FOR P=15 TO 0 STEP -1:PALETTE 0,P:NEXT
2370 IF A$="3" AND F$<>"" THEN 2410
2380 IF A$="4" THEN COLOR 15:LOCATE 20,5:PRINT "ENTER FILE TO LOAD:";:COLOR 9:INPUT "",F$:IF F$="" THEN 2180 ELSE 2530
2390 IF A$="5" THEN 580
2400 GOTO 2320
2410 SCREEN 1:SCREEN 2:SCREEN MODE
2420 IF MODE=1 OR MODE=4 THEN PALETTE 0,BACK2:PALETTE 1,PP1:PALETTE 2,PP2:PALETTE 3,PP3
2430 IF MODE=2 THEN PALETTE 0,BACK2:PALETTE 1,PP1
2440 PUT(0,0),A,PSET
2450 DEF SEG=&HB800
2460 BSAVE F$,0,&H4000
2470 FOR A=1 TO LEN(F$):A$=LEFT$(F$,A):A$=RIGHT$(A$,1)
2480 IF A$="." THEN F$=LEFT$(F$,A-1):GOTO 2500
2490 NEXT
2500 IF MODE=1 OR MODE=4 THEN LOCATE 1,1:PRINT STRING$(40,32):COLOR 1:LOCATE 1,1:PRINT "SAVING IBM PALETTE:":OPEN "O",#1,F$+".PAL":WRITE #1,PP1,PP2,PP3,BACK2:CLOSE:GOTO 2180
2510 IF MODE=2 THEN LOCATE 1,1:PRINT STRING$(80,32):LOCATE 1,1:PRINT "SAVING HI-RES PALETTE:":OPEN "O",#1,F$+".PAL":WRITE #1,PP1,PP2,PP3,BACK2:CLOSE:GOTO 2180
2520 GOTO 2180
2530 SCREEN 2:SCREEN 0:SCREEN MODE:CLS
2540 ON ERROR GOTO 2650
2550 BLOAD F$
2560 IF MODE=1 OR MODE=4 THEN GET(0,0)-(319,199),A:GET(0,0)-(319,8),TOP
2570 IF MODE=2 THEN GET(0,0)-(639,199),A:GET(0,0)-(639,8),TOP
2580 IF MODE=3 THEN GET(0,0)-(159,199),A:GET(0,0)-(159,8),TOP
2590 FOR A=1 TO LEN(F$):A$=LEFT$(F$,A):A$=RIGHT$(A$,1)
2600 IF A$="." THEN F$=LEFT$(F$,A-1):GOTO 2620
2610 NEXT
2620 IF MODE=2 THEN LOCATE 1,1:PRINT STRING$(80,32):LOCATE 1,1:PRINT "LOADING HI-RES PALETTE:":OPEN "I",#1,F$+".PAL":INPUT #1,PP1,PP2,PP3,BACK2:CLOSE:P1=PP1:P2=PP2:P3=PP3:BACK=BACK2:GOTO 2180
2630 IF MODE=1 OR MODE=4 THEN LOCATE 1,1:PRINT STRING$(40,32):LOCATE 1,1:COLOR 1:PRINT "LOADING IBM PALETTE:":OPEN "I",#1,F$+".PAL":INPUT #1,PP1,PP2,PP3,BACK2:CLOSE:P1=PP1:P2=PP2:P3=PP3:BACK=BACK2:GOTO 2180
2640 GOTO 2180
2650 RESUME 2180
2660 SCREEN 2:SCREEN 0:COLOR 15:CLS
2670 LOCATE 1,30:PRINT "Super Art II (Modes)"
2680 LOCATE 2,30:PRINT "--------------------"
2690 COLOR 14:LOCATE 6,25:PRINT "(1) - M O D E    4"
2700 LOCATE 8,25:PRINT "(2) - M O D E    3"
2710 LOCATE 10,25:PRINT "(3) - M O D E    2"
2720 LOCATE 12,25:PRINT "(4) - R E T U R N"
2730 COLOR 10:LOCATE 18,24:PRINT "P R E S E N T    M O D E  "MODE"."
2740 COLOR 7:LOCATE 24,1:PRINT "SELECT OPTION"
2750 A$=INKEY$:IF A$="" THEN 2750
2760 LOCATE 24,1:PRINT STRING$(30,32)
2770 IF A$="1" THEN MODE=4:GOTO 580
2780 IF A$="2" THEN MODE=3:GOTO 580
2785 IF A$="3" THEN MODE=2:GOTO 580
2786 IF A$="4" THEN 580
2790 GOTO 2740
2800 IF A$="4" THEN 580
2810 END
2820 REM MODE 3 CREATOR
2830 P2=PP2:P1=PP1:P3=PP3:BACK=BACK2
2840 CLS:SCREEN 3:PALETTE 0,BACK
2850 IF ZX=1 THEN PUT(0,0),A,PSET:ZX=0
2860 X=10:Y=10:Y2=Y:X2=X:P2=POINT(X,Y)
2865 GET(0,0)-(159,8),TOP
2870 IF BAR=1 THEN GET(0,0)-(159,8),TOP:LOCATE 1,1:PRINT STRING$(20,32):COLOR 1:LOCATE 1,1:PRINT CHR$(176)CHR$(219);:COLOR 2:PRINT CHR$(219);:COLOR 3:PRINT CHR$(219):COLOR 2:LOCATE 1,5:PRINT "FILE=";:COLOR 3:PRINT F$
2880 IF BAR=1 AND P<>0 THEN COLOR P:LOCATE 1,19:PRINT CHR$(219):LINE(0,8)-(159,8),1
2890 IF BAR=1 AND P=0 THEN COLOR 1:LOCATE 1,19:PRINT CHR$(176):LINE(0,8)-(159,8),1
2900 A$=INKEY$:IF A$="" THEN 2900
2901 IF VAL(A$)>0 THEN 2950
2910 IF A$="S" AND BAR=1 AND A$(P2)="0" THEN RN1=FIX(RND*10):RN2=FIX(RND*8):PUT(0,0),TOP,PSET:PSET(X-5+RN1,Y-5+RN2),P:GOTO 2870
2920 IF A$="S" AND BAR=0 AND A$(P2)="0" THEN RN1=FIX(RND*10):RN2=FIX(RND*8):PSET(X-5+RN1,Y-5+RN2),P:GOTO 2900
2930 IF A$="B" AND BAR=1 THEN PUT(0,0),TOP,PSET:BAR=0:GOTO 2900
2940 IF A$="B" AND BAR=0 THEN BAR=1:GOTO 3170
2950 IF A$="8" AND BAR=0 AND Y<>0 THEN Y=Y-1 ELSE IF A$="8" AND BAR=1 AND Y<>9 THEN Y=Y-1
2960 IF A$="2" AND Y<>199 THEN Y=Y+1
2970 IF A$="4" AND X<>0 THEN X=X-1 ELSE IF A$="6" AND X<>159 THEN X=X+1
2980 IF A$=" " THEN A=P2:IF A$(A)="0" THEN P2=P
2990 PSET(X2,Y2),P2:X2=X:Y2=Y:P2=POINT(X,Y):PSET(X,Y),P2+1:IF A$="8" OR A$="2" OR A$="6" OR A$="4" THEN 2900
3000 IF A$=CHR$(13) AND P=15 THEN P=0:GOTO 3190 ELSE IF A$=CHR$(13) AND P<>15 THEN P=P+1:GOTO 3190
3010 IF A$="P" THEN ZX=1:PUT(0,0),TOP,PSET:PSET(X2,Y2),P2:GET(0,0)-(319,199),A:SCREEN 2:SCREEN 0,0,1:P1=PP1:P2=PP2:P3=PP3:GOTO 90
3020 IF A$="F" AND BAR=0 THEN PSET(X2,Y2),P2:PAINT(X,Y),P:PSET(X2,Y2),P:P2=P
3030 IF A$="L" THEN 3220
3040 IF A$="C" THEN 3370
3050 IF A$="R" THEN 3500
3060 IF A$="F" AND BAR=1 THEN PUT(0,0),TOP,PSET:PSET(X2,Y2),P2:PAINT(X,Y),P:PSET(X2,Y2),P:P2=P:GOTO 2870
3070 IF A$=CHR$(17) THEN CLS:GET(0,0)-(159,199),A:GET(0,0)-(159,8),TOP:GOTO 2870
3080 IF A$="D" AND BAR=1 THEN PUT(0,0),TOP,PSET:ZX=1:PSET(X,Y),P2:GET(0,0)-(159,199),A:GOTO 2180
3090 IF A$="D" AND BAR=0 THEN ZX=1:PSET(X,Y),P2:GET(0,0)-(159,199),A:GOTO 2180
3100 IF A$="I" THEN 3670
3110 IF A$="O" THEN 3800
3120 IF A$="E" AND BAR=1 THEN PSET(X,Y),P2:PUT(0,0),TOP,PSET:GET(0,0)-(159,199),A:ZX=1:GOTO 1750
3130 IF A$="E" AND BAR=0 THEN PSET(X,Y),P2:GET(0,0)-(159,199),A:ZX=1:GOTO 1750
3140 IF A$="M" AND BAR=1 THEN PSET(X,Y),P2:PUT(0,0),TOP,PSET:GET(0,0)-(159,199),A:ZX=1:GOTO 2660
3150 IF A$="M" AND BAR=0 THEN PSET(X,Y),P2:GET(0,0)-(159,199),A:ZX=1:GOTO 2660
3160 GOTO 2900
3170 IF Y2<9 THEN PSET(X2,Y2),P2:X=X2:Y=9:X2=X:Y2=Y:P2=POINT(X,Y):GOTO 2870
3180 GOTO 2870
3190 IF BAR=1 AND P<>0 THEN COLOR P:LOCATE 1,19:PRINT CHR$(219):GOTO 2900
3200 IF BAR=1 AND P=0 THEN COLOR 1:LOCATE 1,19:PRINT CHR$(176):GOTO 2900
3210 GOTO 2900
3220 X1=X:Y1=Y
3230 IF BAR=1 THEN PUT(0,0),TOP,PSET
3240 XX=X:YY=Y:GET(X,Y)-(X,Y),B
3250 A$=INKEY$:IF A$="" THEN 3250
3260 IF X1<XX THEN X3=X1 ELSE X3=XX
3270 IF Y1<YY THEN Y3=Y1 ELSE Y3=YY
3280 PUT(X3,Y3),B,PSET
3290 IF A$="4" AND XX<>0 THEN XX=XX-1 ELSE IF A$="6" AND XX<>159 THEN XX=XX+1
3300 IF A$="8" AND YY<>0 THEN YY=YY-1 ELSE IF A$="2" AND YY<>199 THEN YY=YY+1
3310 IF X1<XX THEN X3=X1:X4=XX ELSE X3=XX:X4=X1
3320 IF Y1<YY THEN Y3=Y1:Y4=YY ELSE Y3=YY:Y4=Y1
3330 GET(X3,Y3)-(X4,Y4),B:LINE(X1,Y1)-(XX,YY),P
3340 IF A$=CHR$(13) THEN P2=P:X=XX:Y=YY:X2=XX:Y2=YY:GOTO 2870
3350 IF A$=CHR$(27) THEN PUT(X3,Y3),B,PSET:X=X1:Y=Y1:X=XX:Y=YY:GOTO 2870
3360 GOTO 3250
3370 YY2=Y2:XX2=X2:X1=X-S:X2=X+S:Y1=Y-S:Y2=Y+S:GET(X1,Y1)-(X2,Y2),B
3380 IF BAR=1 THEN PUT(0,0),TOP,PSET
3390 CIRCLE(X,Y),S,P:S2=S
3400 A$=INKEY$:IF A$="" THEN 3400
3410 IF A$="4" AND S<>0 THEN S=S-1 ELSE IF A$="6" THEN S=S+1
3420 IF A$=CHR$(27) THEN PUT(X1,Y1),B,PSET:S=S2:PSET(X,Y),P2:Y2=YY2:X2=XX2:GOTO 2870
3430 IF A$=CHR$(13) THEN PSET(X,Y),P2:Y2=YY2:X2=XX2:GOTO 2870
3440 PUT(X1,Y1),B,PSET
3450 X1=X-S:X2=X+S:Y1=Y-S:Y2=Y+S
3460 IF X1<0 THEN X1=0 ELSE IF X1>159 THEN X1=159
3470 IF Y1<0 THEN Y1=0 ELSE IF Y1>199 THEN Y1=199
3480 GET(X1,Y1)-(X2,Y2),B:CIRCLE(X,Y),S,P
3490 GOTO 3400
3500 X1=X:Y1=Y:X3=X:Y3=Y:Y4=Y:X4=X
3510 IF BAR=1 THEN PUT(0,0),TOP,PSET
3520 GET(X,Y)-(X,Y),B:LINE(X,Y)-(X,Y),P,B
3530 A$=INKEY$:IF A$="" THEN 3530
3540 IF A$="4" AND X1<>0 THEN X1=X1-1 ELSE IF A$="6" THEN X1=X1+1
3550 IF A$="8" AND Y1<>0 THEN Y1=Y1-1 ELSE IF A$="2" THEN Y1=Y1+1
3560 PUT(X3,Y3),B,PSET
3570 IF X1<X THEN X3=X1:X4=X ELSE X3=X:X4=X1
3580 IF Y1<Y THEN Y3=Y1:Y4=Y ELSE Y3=Y:Y4=Y1
3590 IF X1<0 THEN X1=0 ELSE IF X1>159 THEN X1=159
3600 IF X2<0 THEN X2=0 ELSE IF X2>159 THEN X2=159
3610 IF Y1<0 THEN Y1=0 ELSE IF Y1>199 THEN Y1=199
3620 IF Y2<0 THEN Y2=0 ELSE IF Y2>199 THEN Y2=199
3630 GET(X3,Y3)-(X4,Y4),B:LINE(X,Y)-(X1,Y1),P,B
3640 IF A$=CHR$(13) THEN P2=P:GOTO 2870
3650 IF A$=CHR$(27) THEN PUT(X3,Y3),B,PSET:GOTO 2870
3660 GOTO 3530
3670 X1=X:Y1=Y:IF BAR=1 THEN PUT(0,0),TOP,PSET
3680 PSET(X,Y),P2
3690 GET(X,Y)-(X,Y),C:X8=X:X9=X:Y8=Y:Y9=Y
3700 A$=INKEY$:IF A$="" THEN 3700
3710 IF A$="4" AND X1<>0 THEN X1=X1-1 ELSE IF A$="6" AND X1<>159 THEN X1=X1+1
3720 IF A$="8" AND Y1<>0 THEN Y1=Y1-1 ELSE IF A$="2" AND Y1<>199 THEN Y1=Y1+1
3730 PUT(X8,Y8),C,PSET
3740 IF X1<X THEN X8=X1:X9=X ELSE X8=X:X9=X1
3750 IF Y1<Y THEN Y8=Y1:Y9=Y ELSE Y8=Y:Y9=Y1
3760 GET(X8,Y8)-(X9,Y9),C:LINE(X8,Y8)-(X9,Y9),P,B
3770 IF A$=CHR$(27) THEN PUT(X8,Y8),C,PSET:GET(X,Y)-(X,Y),C:X8=X:X9=X:Y8=Y:Y9=Y:GOTO 2870
3780 IF A$=CHR$(13) THEN PUT(X8,Y8),C,PSET:P2=POINT(X,Y):GOTO 2870
3790 GOTO 3700
3800 D=X9-X8:D2=Y9-Y8:X8=X:Y8=Y:X9=X8+D:Y9=Y8+D2:IF X8>159 OR X9>159 THEN 2900
3810 IF X8<0 OR X9<0 THEN 2900
3820 IF Y8<0 OR Y9<0 THEN 2900
3830 IF Y8>199 OR Y9>199 THEN 2900
3840 IF BAR=1 THEN PUT(0,0),TOP,PSET
3850 PSET(X,Y),P2
3860 XX1=X8:YY1=Y8
3870 TX1=159-(X9-X8):TY1=199-(Y9-Y8)
3880 PUT(XX1,YY1),C
3890 A$=INKEY$:IF A$="" THEN 3890
3900 PUT(XX1,YY1),C
3910 IF A$="4" AND XX1<>0 THEN XX1=XX1-1 ELSE IF A$="6" AND XX1<>TX1 THEN XX1=XX1+1
3920 IF A$="8" AND YY1<>0 THEN YY1=YY1-1 ELSE IF A$="2" AND YY1<>TY1 THEN YY1=YY1+1
3930 PUT(XX1,YY1),C
3940 IF A$=CHR$(27) THEN PUT(XX1,YY1),C:GOTO 2870
3950 IF A$=CHR$(13) THEN PUT(XX1,YY1),C,PSET:X=XX1:Y=YY1:GOTO 2870
3960 IF A$="T" THEN X=X8:Y=Y8:GOTO 2870
3970 GOTO 3890
4000 REM MODE 2 CREATOR
4010 P2=PP2:P1=PP1:P3=PP3:BACK=BACK2
4015 P=1
4020 CLS:SCREEN 2:PALETTE 0,BACK:PALETTE 1,PP1
4030 IF ZX=1 THEN PUT(0,0),A,PSET:ZX=0
4040 X=10:Y=10:Y2=Y:X2=X:P2=POINT(X,Y)
4045 GET(0,0)-(639,8),TOP
4050 IF BAR=1 THEN GET(0,0)-(639,8),TOP:LOCATE 1,1:PRINT STRING$(80,32):LOCATE 1,1:PRINT CHR$(176)CHR$(219);:PRINT CHR$(219);:PRINT CHR$(219):LOCATE 1,5:PRINT "FILE=";:PRINT F$:LOCATE 1,70:PRINT "PEN ="
4060 IF BAR=1 AND P<>0 THEN LOCATE 1,77:PRINT CHR$(219):LINE(0,8)-(639,8),1
4070 IF BAR=1 AND P=0 THEN LOCATE 1,77:PRINT CHR$(176):LINE(0,8)-(639,8),1
4080 A$=INKEY$:IF A$="" THEN 4080
4090 IF A$="S" AND BAR=1 AND A$(P2)="0" THEN RN1=FIX(RND*10):RN2=FIX(RND*8):PUT(0,0),TOP,PSET:PSET(X-5+RN1,Y-5+RN2),P:GOTO 4050
4100 IF A$="S" AND BAR=0 AND A$(P2)="0" THEN RN1=FIX(RND*10):RN2=FIX(RND*8):PSET(X-5+RN1,Y-5+RN2),P:GOTO 4080
4110 IF A$="B" AND BAR=1 THEN PUT(0,0),TOP,PSET:BAR=0:GOTO 4080
4120 IF A$="B" AND BAR=0 THEN BAR=1:GOTO 4350
4130 IF A$="8" AND BAR=0 AND Y<>0 THEN Y=Y-1 ELSE IF A$="8" AND BAR=1 AND Y<>9 THEN Y=Y-1
4140 IF A$="2" AND Y<>199 THEN Y=Y+1
4150 IF A$="4" AND X<>0 THEN X=X-1 ELSE IF A$="6" AND X<>639 THEN X=X+1
4160 IF A$=" " THEN A=P2:IF A$(A)="0" THEN P2=P
4170 PSET(X2,Y2),P2:X2=X:Y2=Y:P2=POINT(X,Y):PSET(X,Y),P2+1:IF A$="8" OR A$="2" OR A$="6" OR A$="4" THEN 4080
4180 IF A$=CHR$(13) AND P=2 THEN P=0:GOTO 4370 ELSE IF A$=CHR$(13) AND P<>15 THEN P=P+1:GOTO 4370
4190 IF A$="P" THEN ZX=1:PUT(0,0),TOP,PSET:PSET(X2,Y2),P2:GET(0,0)-(639,199),A:SCREEN 2:SCREEN 0,0,1:P1=PP1:P2=PP2:P3=PP3:GOTO 90
4200 IF A$="F" AND BAR=0 THEN PSET(X2,Y2),P2:PAINT(X,Y),P:PSET(X2,Y2),P:P2=P
4210 IF A$="L" THEN 4400
4220 IF A$="C" THEN 4550
4230 IF A$="R" THEN 4680
4240 IF A$="F" AND BAR=1 THEN PUT(0,0),TOP,PSET:PSET(X2,Y2),P2:PAINT(X,Y),P:PSET(X2,Y2),P:P2=P:GOTO 4050
4250 IF A$=CHR$(17) THEN CLS:GET(0,0)-(639,199),A:GET(0,0)-(639,8),TOP:GOTO 4050
4260 IF A$="D" AND BAR=1 THEN PUT(0,0),TOP,PSET:ZX=1:PSET(X,Y),P2:GET(0,0)-(639,199),A:GOTO 2180
4270 IF A$="D" AND BAR=0 THEN ZX=1:PSET(X,Y),P2:GET(0,0)-(639,199),A:GOTO 2180
4280 IF A$="I" THEN 4850
4290 IF A$="O" THEN 4980
4300 IF A$="E" AND BAR=1 THEN PSET(X,Y),P2:PUT(0,0),TOP,PSET:GET(0,0)-(639,199),A:ZX=1:GOTO 1750
4310 IF A$="E" AND BAR=0 THEN PSET(X,Y),P2:GET(0,0)-(639,199),A:ZX=1:GOTO 1750
4320 IF A$="M" AND BAR=1 THEN PSET(X,Y),P2:PUT(0,0),TOP,PSET:GET(0,0)-(639,199),A:ZX=1:GOTO 2660
4330 IF A$="M" AND BAR=0 THEN PSET(X,Y),P2:GET(0,0)-(639,199),A:ZX=1:GOTO 2660
4340 GOTO 4080
4350 IF Y2<9 THEN PSET(X2,Y2),P2:X=X2:Y=9:X2=X:Y2=Y:P2=POINT(X,Y):GOTO 4050
4360 GOTO 4050
4370 IF BAR=1 AND P<>0 THEN LOCATE 1,19:PRINT CHR$(219):GOTO 4080
4380 IF BAR=1 AND P=0 THEN LOCATE 1,19:PRINT CHR$(176):GOTO 4080
4390 GOTO 4080
4400 X1=X:Y1=Y
4410 IF BAR=1 THEN PUT(0,0),TOP,PSET
4420 XX=X:YY=Y:GET(X,Y)-(X,Y),B
4430 A$=INKEY$:IF A$="" THEN 4430
4440 IF X1<XX THEN X3=X1 ELSE X3=XX
4450 IF Y1<YY THEN Y3=Y1 ELSE Y3=YY
4460 PUT(X3,Y3),B,PSET
4470 IF A$="4" AND XX<>0 THEN XX=XX-1 ELSE IF A$="6" AND XX<>639 THEN XX=XX+1
4480 IF A$="8" AND YY<>0 THEN YY=YY-1 ELSE IF A$="2" AND YY<>199 THEN YY=YY+1
4490 IF X1<XX THEN X3=X1:X4=XX ELSE X3=XX:X4=X1
4500 IF Y1<YY THEN Y3=Y1:Y4=YY ELSE Y3=YY:Y4=Y1
4510 GET(X3,Y3)-(X4,Y4),B:LINE(X1,Y1)-(XX,YY),P
4520 IF A$=CHR$(13) THEN P2=P:X=XX:Y=YY:X2=XX:Y2=YY:GOTO 4050
4530 IF A$=CHR$(27) THEN PUT(X3,Y3),B,PSET:X=X1:Y=Y1:X=XX:Y=YY:GOTO 4050
4540 GOTO 4430
4550 YY2=Y2:XX2=X2:X1=X-S:X2=X+S:Y1=Y-S:Y2=Y+S:GET(X1,Y1)-(X2,Y2),B
4560 IF BAR=1 THEN PUT(0,0),TOP,PSET
4570 CIRCLE(X,Y),S,P:S2=S
4580 A$=INKEY$:IF A$="" THEN 4580
4590 IF A$="4" AND S<>0 THEN S=S-1 ELSE IF A$="6" THEN S=S+1
4600 IF A$=CHR$(27) THEN PUT(X1,Y1),B,PSET:S=S2:PSET(X,Y),P2:Y2=YY2:X2=XX2:GOTO 4050
4610 IF A$=CHR$(13) THEN PSET(X,Y),P2:Y2=YY2:X2=XX2:GOTO 4050
4620 PUT(X1,Y1),B,PSET
4630 X1=X-S:X2=X+S:Y1=Y-S:Y2=Y+S
4640 IF X1<0 THEN X1=0 ELSE IF X1>639 THEN X1=639
4650 IF Y1<0 THEN Y1=0 ELSE IF Y1>199 THEN Y1=199
4660 GET(X1,Y1)-(X2,Y2),B:CIRCLE(X,Y),S,P
4670 GOTO 4580
4680 X1=X:Y1=Y:X3=X:Y3=Y:Y4=Y:X4=X
4690 IF BAR=1 THEN PUT(0,0),TOP,PSET
4700 GET(X,Y)-(X,Y),B:LINE(X,Y)-(X,Y),P,B
4710 A$=INKEY$:IF A$="" THEN 4710
4720 IF A$="4" AND X1<>0 THEN X1=X1-1 ELSE IF A$="6" THEN X1=X1+1
4730 IF A$="8" AND Y1<>0 THEN Y1=Y1-1 ELSE IF A$="2" THEN Y1=Y1+1
4740 PUT(X3,Y3),B,PSET
4750 IF X1<X THEN X3=X1:X4=X ELSE X3=X:X4=X1
4760 IF Y1<Y THEN Y3=Y1:Y4=Y ELSE Y3=Y:Y4=Y1
4770 IF X1<0 THEN X1=0 ELSE IF X1>639 THEN X1=639
4780 IF X2<0 THEN X2=0 ELSE IF X2>639 THEN X2=639
4790 IF Y1<0 THEN Y1=0 ELSE IF Y1>199 THEN Y1=199
4800 IF Y2<0 THEN Y2=0 ELSE IF Y2>199 THEN Y2=199
4810 GET(X3,Y3)-(X4,Y4),B:LINE(X,Y)-(X1,Y1),P,B
4820 IF A$=CHR$(13) THEN P2=P:GOTO 4050
4830 IF A$=CHR$(27) THEN PUT(X3,Y3),B,PSET:GOTO 4050
4840 GOTO 4710
4850 X1=X:Y1=Y:IF BAR=1 THEN PUT(0,0),TOP,PSET
4860 PSET(X,Y),P2
4870 GET(X,Y)-(X,Y),C:X8=X:X9=X:Y8=Y:Y9=Y
4880 A$=INKEY$:IF A$="" THEN 4880
4890 IF A$="4" AND X1<>0 THEN X1=X1-1 ELSE IF A$="6" AND X1<>639 THEN X1=X1+1
4900 IF A$="8" AND Y1<>0 THEN Y1=Y1-1 ELSE IF A$="2" AND Y1<>639 THEN Y1=Y1+1
4910 PUT(X8,Y8),C,PSET
4920 IF X1<X THEN X8=X1:X9=X ELSE X8=X:X9=X1
4930 IF Y1<Y THEN Y8=Y1:Y9=Y ELSE Y8=Y:Y9=Y1
4940 GET(X8,Y8)-(X9,Y9),C:LINE(X8,Y8)-(X9,Y9),P,B
4950 IF A$=CHR$(27) THEN PUT(X8,Y8),C,PSET:GET(X,Y)-(X,Y),C:X8=X:X9=X:Y8=Y:Y9=Y:GOTO 4050
4960 IF A$=CHR$(13) THEN PUT(X8,Y8),C,PSET:P2=POINT(X,Y):GOTO 4050
4970 GOTO 4880
4980 D=X9-X8:D2=Y9-Y8:X8=X:Y8=Y:X9=X8+D:Y9=Y8+D2:IF X8>639 OR X9>639 THEN 4080
4990 IF X8<0 OR X9<0 THEN 4080
5000 IF Y8<0 OR Y9<0 THEN 4080
5010 IF Y8>199 OR Y9>199 THEN 4080
5020 IF BAR=1 THEN PUT(0,0),TOP,PSET
5030 PSET(X,Y),P2
5040 XX1=X8:YY1=Y8
5050 TX1=639-(X9-X8):TY1=199-(Y9-Y8)
5060 PUT(XX1,YY1),C
5070 A$=INKEY$:IF A$="" THEN 1660
5080 PUT(XX1,YY1),C
5090 IF A$="4" AND XX1<>0 THEN XX1=XX1-1 ELSE IF A$="6" AND XX1<>TX1 THEN XX1=XX1+1
5100 IF A$="8" AND YY1<>0 THEN YY1=YY1-1 ELSE IF A$="2" AND YY1<>TY1 THEN YY1=YY1+1
5110 PUT(XX1,YY1),C
5120 IF A$=CHR$(27) THEN PUT(XX1,YY1),C:GOTO 4050
5130 IF A$=CHR$(13) THEN PUT(XX1,YY1),C,PSET:X=X8:Y=Y8:GOTO 4050
5140 IF A$="T" THEN X=X8:Y=Y8:GOTO 4050
5150 GOTO 5070
